package h2k.web.controller;

import h2k.web.service.mainService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MainController {
	@Autowired mainService service;
	
	@RequestMapping("main.do")
	public ModelAndView main(HttpServletRequest req, HttpServletResponse res){
		String title = service.mainTitle();
		
		return new ModelAndView("main", "title", title);
	}
}
